package com.hjxr.quota.define.dto;

import com.hjxr.quota.define.domain.Quota;
import com.hjxr.quota.define.domain.QuotaFormula;
import lombok.Data;

import java.util.List;

import java.util.Map;

/**
 * @author ma
 * @version v1.0
 * @date 2020/9/18
 **/
@Data
public class QuotaCreateDto extends Quota {
    /**
     * <>指标来源表</>指标来源类型.1：数据库；2：excel文件；3：csv文件；4：txt文件；5：其他
     */
    private String sType;

    /**
     * 指标来源地址，文件为存储地址，数据库为jdbc数据库连接串；如： jdbc:oracle:thin:@localhost:1521:DataBaseName；jdbc:mysql://localhost:3306/DataBaseName
     */
    private String addr;
    /**
     * 指标来源文件名，或者表名称
     */
    private String sTable;

    private Integer datasourceId;
    /**
     * 字段别名表id
     */
    private Integer colnameId;
    /**
     * 指标所属列名，数据库为字段名
     */
    private String sCol;
    /**
     * 指标所属行，只针对文本
     */
    private String sRow;
    /**
     * 指标生成SQL语句，只针对SQL方式创建的指标
     */
    private String qsql;
    /**
     * 指标计算公式
     */
    private String formula;

    /** 度量列 */
    private String measureCol;
    /**
     * 维度集合
     */
    private String dimensions;
    private Map<String,String> dimMap;
    private Map<Integer,Integer> dimIntMap;
    private List<QuotaFormula> quotaFormulaList;
    private String measureValue;
    private Float quotaValue;
    /**
     * 生成值类型id
     */
    private String typeId;

    public String getsType() {
        return sType;
    }

    public String getAddr() {
        return addr;
    }

    public String getsTable() {
        return sTable;
    }

    public Integer getColnameId() {
        return colnameId;
    }

    public String getsCol() {
        return sCol;
    }

    public String getsRow() {
        return sRow;
    }

    public String getQsql() {
        return qsql;
    }

    public String getFormula() {
        return formula;
    }

    public String getDimensions() {
        return dimensions;
    }

    public String getMeasureValue() {
        return measureValue;
    }

    public Float getQuotaValue() {
        return quotaValue;
    }

    public Integer getDatasourceId() {
        return datasourceId;
    }

    public void setsType(String sType) {
        this.sType = sType;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public void setsTable(String sTable) {
        this.sTable = sTable;
    }

    public void setColnameId(Integer colnameId) {
        this.colnameId = colnameId;
    }

    public void setsCol(String sCol) {
        this.sCol = sCol;
    }

    public void setsRow(String sRow) {
        this.sRow = sRow;
    }

    public void setQsql(String qsql) {
        this.qsql = qsql;
    }

    public void setFormula(String formula) {
        this.formula = formula;
    }

    public void setDimensions(String dimensions) {
        this.dimensions = dimensions;
    }

    public void setMeasureValue(String measureValue) {
        this.measureValue = measureValue;
    }

    public void setQuotaValue(Float quotaValue) {
        this.quotaValue = quotaValue;
    }

    public void setDatasourceId(Integer datasourceId) {
        this.datasourceId = datasourceId;
    }
}
